\vssub
\subsection{~Use of tidal analysis} \label{sub:num_tide}
\conthead{\ws}{F. Ardhuin}

\noindent
In order to reduce the volume of input files, the water levels and currents
can be defined by their tidal amplitudes and phases. This is made possible by
using the {\code TIDE} switch which activates the detection of the needed
information in current.ww3 and level.ww3 files. The tidal analysis can be
performed from NetCDF current or water level files, using the {\file
  ww3\_prnc} preprocessing program. In that case the analysis method uses the
flexible tide analysis package by \cite{art:For09}. The precomputed tidal constituents 
can be used at run time by {\file ww3\_shel}.

However, that method may not be very efficient due to the large memory 
required to store a large number of tidal constituents because, like other 
forcing parameters, they are not decomposed across processors: each processor stores the full 
spatial grid of forcing parameters. To avoid this,  
the tidal constituents can be used to generated time series with the tidal
prediction program {\file ww3\_prtide}, which produces the usual {\file current.ww3} or 
{\file level.ww3} files.

The choice of tidal constituents for the analysis and prediction are specified
in the input files for {\file ww3\_prnc} and {\file ww3\_prtide}. Two
short-cuts are defined. {\code VFAST} is the following selection of 20
components, Z0 (mean), SSA, MSM, MSF, MF, 2N2, MU2, N2, NU2, M2, S2, K2, MSN2,
MN4, M4, MS4, S4, M6, 2MS6, and M8. When using {\code ww3\_shel} to do the
tidal prediction, the time step for currents or water is set to 1800~s.

In {\file ww3\_prtide}, there is also a quality check on the values of the
tidal constituents that is performed: unrealistically large values of the
amplitudes for some constituents can be defined in {\file ww3\_prtide.inp}.
For model grid points where these are exceeded, all components are set to
zero, except for UNST grids, in which the neighbors are searched to provide a
reasonable value and avoid strong gradients.
